package com.cn.controller;

import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

/**
 * @author: chenyuncong
 * @Date: 2019/12/24 15:48
 */
@RestController
@Slf4j
@RequestMapping("log")
public class LogController {

    @GetMapping("showLog")
    public Map<String,String> showLog(){
        Map<String,String> map = new HashMap<String, String>(){{
            this.put("name","小明");
            this.put("uuid", UUID.randomUUID().toString());
        }};
        log.info("showLog -> : {}",JSON.toJSONString(map));
        return map;
    }
}
